package cn.ydxiaoshaui.aip.imageclassify.bean;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

import java.io.Serializable;

/**
 * @Description 地标识别
 * @author 小帅丶
 * @className LandmarkDetect
 * @Date 2019/9/26
 **/
public class LandmarkDetect implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 唯一的log id，用于问题定位 */
    private Long log_id;
    /** 识别结果 */
    private Result result;

    public Long getLog_id() {
        return log_id;
    }

    public void setLog_id(Long log_id) {
        this.log_id = log_id;
    }

    public Result getResult() {
        return result;
    }

    public void setResult(Result result) {
        this.result = result;
    }

    private static class Result{
        /** 地标名称，无法识别则返回空字符串 */
        private String landmark;

        public String getLandmark() {
            return landmark;
        }

        public void setLandmark(String landmark) {
            this.landmark = landmark;
        }
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this, new SerializerFeature[] {
                SerializerFeature.WriteMapNullValue,
                SerializerFeature.WriteNullListAsEmpty,
                SerializerFeature.WriteNullStringAsEmpty,
                SerializerFeature.WriteNullNumberAsZero,
                SerializerFeature.WriteNullBooleanAsFalse,
                SerializerFeature.UseISO8601DateFormat });
    }
}
